﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

using Vitruvian.Serialization;
using Vitruvian.Serialization.Formatters;
using Vitruvian.Windows.Serialization.Formatters;
using Vitruvian.Logging;
using Vitruvian.Testing;

namespace SpotItComponents
{
    [OptimisticSerialization]
    public class PlayingCard
    {
        #region Public Methods
        [ImageFormatter]
        public Image CardImage { get; set; }
        public List<HotSpot> HotSpots { get; set; }

        [DontSerialize]
        public Guid CardId { get; set; }
        #endregion

        #region Constructors
        public PlayingCard()
        {
            HotSpots = new List<HotSpot>();
        }

        public PlayingCard(Card card)
        {
            CardImage = card.CardImage;
            HotSpots = new List<HotSpot>();
            foreach (SymbolPositioning positioning in card.Positionings)
                HotSpots.Add(new HotSpot(positioning));
        }
        #endregion
    }
}
